<script setup lang="ts">

  const apiPrefix = 'afCount'

  const { state } = useTable({
    apiPrefix,
    searchColumn: [],
    queryApi: () => {
      if(state.apiPrefix){
        console.log('请求开始')
        return useGet(`/${state.apiPrefix}/page`,{},{
          // 开发模式下使用自定义的接口
          // customDev: true
        })
      }
    },
    afterQuery: (res) => {
      return res
    },
    _pagination:{
      column: '',
      pageSize: 999,
      pageSizeOptions: ['999']
    },
  })

  const columns = shallowRef([
    {
      title: '链接码',
      dataIndex: 'linkCode',
    },
    {
      title: '转化个数',
      dataIndex: 'count',
    },
    // {
    //   title: '日期',
    //   dataIndex: 'date',
    // },
    {
      title: '最近转化时间',
      dataIndex: 'lastTime'
    }

  ])

</script>

<template>
      <a-card>
        <a-table
            row-key="id" :row-selection="state.rowSelections" :loading="state.loading" :columns="columns"
            :data-source="state.dataSource" :pagination="state.pagination"
        >
        </a-table>
      </a-card>

</template>

<style scoped lang="less">

</style>